package com.wechat.back.mapper;

import com.wechat.back.pojo.Admin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AdminMapper {

    @Select("select * from admin where admin_name=#{adminName}")
    Admin findByAdminName(String adminName);

    @Insert("insert into admin(admin_name,password,create_time,update_time)" +
    " values(#{adminName},#{password},now(),now())")
    void add(String adminName, String password);

}
